/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MODEL;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 *
 * @author Rodrigo
 */
public class Relogio{
     private static String now(String dateFormat) {
        Calendar cal = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
        return sdf.format(cal.getTime());
    }
     
    public String getData(){
        return this.now("dd/MM/yy");
    }
    
    public String getHora(){
        return this.now("hh:mm:ss");
    }
}
